\section{/home/msneddon/eclipse/galileoSR1\_\-cpp/workspace/NFsim/src/NFscheduler/Scheduler.h File Reference}
\label{Scheduler_8h}\index{/home/msneddon/eclipse/galileoSR1\_\-cpp/workspace/NFsim/src/NFscheduler/Scheduler.h@{/home/msneddon/eclipse/galileoSR1\_\-cpp/workspace/NFsim/src/NFscheduler/Scheduler.h}}


{\tt \#include \char`\"{}NFstream.h\char`\"{}}\par
{\tt \#include \char`\"{}../NFsim.hh\char`\"{}}\par
{\tt \#include $<$vector$>$}\par
{\tt \#include $<$string$>$}\par
{\tt \#include $<$map$>$}\par
{\tt \#include $<$iostream$>$}\par
{\tt \#include $<$fstream$>$}\par
{\tt \#include $<$sstream$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct {\bf job}
\item 
struct {\bf scan}
\item 
struct {\bf model}
\item 
struct {\bf msgtype}
\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf MASTER}~0
\item 
\#define {\bf TAG\_\-MSG}~99
\item 
\#define {\bf TAG\_\-DATA}~98
\item 
\#define {\bf MSG\_\-DATA\_\-SIZE}~(1$<$$<$20)
\item 
\#define {\bf MAX\_\-MPI\_\-SIZE}~4096
\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \{ \par
{\bf cmd\_\-free} = 0, 
{\bf cmd\_\-job}, 
{\bf cmd\_\-pre\_\-data\_\-ack}, 
{\bf cmd\_\-data\_\-ack}, 
\par
{\bf rpt\_\-ready}, 
{\bf rpt\_\-pre\_\-data}, 
{\bf rpt\_\-data}, 
{\bf rpt\_\-done}
 \}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
vector$<$ {\bf job} $\ast$ $>$ {\bf parseJobsFile} (string filename)
\item 
int {\bf schedulerInterpreter} (int $\ast$argc, char $\ast$$\ast$$\ast$argv)
\item 
void {\bf convertModelScanToJobs} ({\bf model} $\ast$\&currentModel, {\bf scan} $\ast$currentScan, vector$<$ {\bf job} $\ast$ $>$ \&joblist)
\item 
const char $\ast$ {\bf itoa} (int inNum)
\item 
const char $\ast$ {\bf dtoa} (double inNum)
\item 
string {\bf getFileLine} (ifstream \&input)
\item 
vector$<$ string $>$ $\ast$ {\bf stringToStrings} (string fullString, const char $\ast$delim, bool treatConsecutiveDelimAsOne=true)
\item 
vector$<$ string $>$ $\ast$ {\bf getStringsFileline} (ifstream \&input, const char $\ast$delim, bool treatConsecutiveDelimAsOne)
\item 
void {\bf findandreplace} (string \&source, string find, string replace)
\item 
void {\bf printFileLineOutput} ()
\item 
void {\bf push\_\-stream} (int rank, {\bf NFstream} \&strm)
\item 
void {\bf send\_\-to\_\-slave} (int slave, int tag, int datalen, char $\ast$data)
\item 
void {\bf send\_\-to\_\-master} (int myid, int tag, int datalen, char $\ast$data)
\item 
void {\bf recv\_\-from\_\-slave} ()
\item 
void {\bf recv\_\-from\_\-master} ()
\item 
void {\bf perr} (const char $\ast$)
\item 
void {\bf printParallelJobOutput} (vector$<$ {\bf job} $\ast$ $>$ jobQueue)
\item 
void {\bf FinalizeMPI} ()
\item 
void {\bf InitializeMPI} (int $\ast$argc, char $\ast$$\ast$$\ast$argv, int \&Size, int \&Rank)
\item 
string {\bf load\_\-to\_\-buffer} (string filename)
\item 
void {\bf DynamicParallel} (map$<$ string, string $>$ argMap, int rank, int size)
\item 
void {\bf EmbarrassingParallel} (map$<$ string, string $>$ argMap, int rank, int size)
\item 
string {\bf BroadcastString} (int Rank, int From, string InBuffer)
\item 
string {\bf ConvergeAllData} (int Rank, int Size, string Buffer)
\item 
void {\bf ConvertStringToBufferMap} (map$<$ string, map$<$ int, string $>$ $>$ \&FileMap, string ReportBuffer)
\item 
string {\bf ConvertBufferMapToString} (map$<$ string, map$<$ int, string $>$ $>$ \&FileBuffers)
\item 
char $\ast$ {\bf ConvertStringToCString} (string Buffer)
\item 
void {\bf PrintFileBuffer} (map$<$ string, map$<$ int, string $>$ $>$ FileMap, vector$<$ {\bf job} $\ast$ $>$ JobQueue)
\item 
string {\bf getPath} (string Filename)
\end{CompactItemize}


\subsection{Define Documentation}
\index{Scheduler.h@{Scheduler.h}!MASTER@{MASTER}}
\index{MASTER@{MASTER}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MASTER~0}\label{Scheduler_8h_3fa2d3bf1901157f734a584d47b25d8b}


\index{Scheduler.h@{Scheduler.h}!MAX\_\-MPI\_\-SIZE@{MAX\_\-MPI\_\-SIZE}}
\index{MAX\_\-MPI\_\-SIZE@{MAX\_\-MPI\_\-SIZE}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MAX\_\-MPI\_\-SIZE~4096}\label{Scheduler_8h_d57d55a8edcc242da2bfd2167b640afd}


\index{Scheduler.h@{Scheduler.h}!MSG\_\-DATA\_\-SIZE@{MSG\_\-DATA\_\-SIZE}}
\index{MSG\_\-DATA\_\-SIZE@{MSG\_\-DATA\_\-SIZE}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MSG\_\-DATA\_\-SIZE~(1$<$$<$20)}\label{Scheduler_8h_c917a0f8972158be55b6da9f6496ee0c}


\index{Scheduler.h@{Scheduler.h}!TAG\_\-DATA@{TAG\_\-DATA}}
\index{TAG\_\-DATA@{TAG\_\-DATA}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TAG\_\-DATA~98}\label{Scheduler_8h_a00ccb735f252f9bf267dacb79bc17c8}


\index{Scheduler.h@{Scheduler.h}!TAG\_\-MSG@{TAG\_\-MSG}}
\index{TAG\_\-MSG@{TAG\_\-MSG}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TAG\_\-MSG~99}\label{Scheduler_8h_f8da514896301401c20350e7ab2c3a0a}




\subsection{Enumeration Type Documentation}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}anonymous enum}\label{Scheduler_8h_bc6126af1d45847bc59afa0aa3216b04}


\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{cmd\_\-free@{cmd\_\-free}!Scheduler.h@{Scheduler.h}}\index{Scheduler.h@{Scheduler.h}!cmd\_\-free@{cmd\_\-free}}\item[{\em 
cmd\_\-free\label{Scheduler_8h_bc6126af1d45847bc59afa0aa3216b0412b32224ce1a9587fca0f46c370eede6}
}]\index{cmd\_\-job@{cmd\_\-job}!Scheduler.h@{Scheduler.h}}\index{Scheduler.h@{Scheduler.h}!cmd\_\-job@{cmd\_\-job}}\item[{\em 
cmd\_\-job\label{Scheduler_8h_bc6126af1d45847bc59afa0aa3216b04faf648a6259c3b39ebd10fcdbcf5ad4e}
}]\index{cmd\_\-pre\_\-data\_\-ack@{cmd\_\-pre\_\-data\_\-ack}!Scheduler.h@{Scheduler.h}}\index{Scheduler.h@{Scheduler.h}!cmd\_\-pre\_\-data\_\-ack@{cmd\_\-pre\_\-data\_\-ack}}\item[{\em 
cmd\_\-pre\_\-data\_\-ack\label{Scheduler_8h_bc6126af1d45847bc59afa0aa3216b04b15a4591263fddc53c7b0562d0c74be7}
}]\index{cmd\_\-data\_\-ack@{cmd\_\-data\_\-ack}!Scheduler.h@{Scheduler.h}}\index{Scheduler.h@{Scheduler.h}!cmd\_\-data\_\-ack@{cmd\_\-data\_\-ack}}\item[{\em 
cmd\_\-data\_\-ack\label{Scheduler_8h_bc6126af1d45847bc59afa0aa3216b04f367d7988d41adc5b39e6fd52cf0543d}
}]\index{rpt\_\-ready@{rpt\_\-ready}!Scheduler.h@{Scheduler.h}}\index{Scheduler.h@{Scheduler.h}!rpt\_\-ready@{rpt\_\-ready}}\item[{\em 
rpt\_\-ready\label{Scheduler_8h_bc6126af1d45847bc59afa0aa3216b0403f89575c9e6091b8692e853bf42c051}
}]\index{rpt\_\-pre\_\-data@{rpt\_\-pre\_\-data}!Scheduler.h@{Scheduler.h}}\index{Scheduler.h@{Scheduler.h}!rpt\_\-pre\_\-data@{rpt\_\-pre\_\-data}}\item[{\em 
rpt\_\-pre\_\-data\label{Scheduler_8h_bc6126af1d45847bc59afa0aa3216b045e4a62b4453730ca1c1ebf5b70842917}
}]\index{rpt\_\-data@{rpt\_\-data}!Scheduler.h@{Scheduler.h}}\index{Scheduler.h@{Scheduler.h}!rpt\_\-data@{rpt\_\-data}}\item[{\em 
rpt\_\-data\label{Scheduler_8h_bc6126af1d45847bc59afa0aa3216b04047bc14a1540904385e3707498ff5cdb}
}]\index{rpt\_\-done@{rpt\_\-done}!Scheduler.h@{Scheduler.h}}\index{Scheduler.h@{Scheduler.h}!rpt\_\-done@{rpt\_\-done}}\item[{\em 
rpt\_\-done\label{Scheduler_8h_bc6126af1d45847bc59afa0aa3216b04a3ceee5c512faae9fd1b8e2a4229729c}
}]\end{description}
\end{Desc}



\subsection{Function Documentation}
\index{Scheduler.h@{Scheduler.h}!BroadcastString@{BroadcastString}}
\index{BroadcastString@{BroadcastString}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string BroadcastString (int {\em Rank}, int {\em From}, string {\em InBuffer})}\label{Scheduler_8h_f8ef6979cfea72e0f41c2e18b5f5a540}


\index{Scheduler.h@{Scheduler.h}!ConvergeAllData@{ConvergeAllData}}
\index{ConvergeAllData@{ConvergeAllData}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string ConvergeAllData (int {\em Rank}, int {\em Size}, string {\em Buffer})}\label{Scheduler_8h_38d7fdff0a2a15375c81318a12dd5042}


\index{Scheduler.h@{Scheduler.h}!ConvertBufferMapToString@{ConvertBufferMapToString}}
\index{ConvertBufferMapToString@{ConvertBufferMapToString}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string ConvertBufferMapToString (map$<$ string, map$<$ int, string $>$ $>$ \& {\em FileBuffers})}\label{Scheduler_8h_0ac40622eab05016237d747ea3be4864}


\index{Scheduler.h@{Scheduler.h}!convertModelScanToJobs@{convertModelScanToJobs}}
\index{convertModelScanToJobs@{convertModelScanToJobs}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void convertModelScanToJobs ({\bf model} $\ast$\& {\em currentModel}, {\bf scan} $\ast$ {\em currentScan}, vector$<$ {\bf job} $\ast$ $>$ \& {\em joblist})}\label{Scheduler_8h_ff9790a0402775daf50d8fdb38ed0eb0}


\index{Scheduler.h@{Scheduler.h}!ConvertStringToBufferMap@{ConvertStringToBufferMap}}
\index{ConvertStringToBufferMap@{ConvertStringToBufferMap}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ConvertStringToBufferMap (map$<$ string, map$<$ int, string $>$ $>$ \& {\em FileMap}, string {\em ReportBuffer})}\label{Scheduler_8h_90c6f823e08c7900e58f2bd9eaa429fa}


\index{Scheduler.h@{Scheduler.h}!ConvertStringToCString@{ConvertStringToCString}}
\index{ConvertStringToCString@{ConvertStringToCString}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ConvertStringToCString (string {\em Buffer})}\label{Scheduler_8h_cc55f45d718374b589515fd91db19960}


\index{Scheduler.h@{Scheduler.h}!dtoa@{dtoa}}
\index{dtoa@{dtoa}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ dtoa (double {\em inNum})}\label{Scheduler_8h_c075c76095b2af6fbe6b614ac8023c78}


\index{Scheduler.h@{Scheduler.h}!DynamicParallel@{DynamicParallel}}
\index{DynamicParallel@{DynamicParallel}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void DynamicParallel (map$<$ string, string $>$ {\em argMap}, int {\em rank}, int {\em size})}\label{Scheduler_8h_6674159690dcb33cd5bb677f8900190a}


\index{Scheduler.h@{Scheduler.h}!EmbarrassingParallel@{EmbarrassingParallel}}
\index{EmbarrassingParallel@{EmbarrassingParallel}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void EmbarrassingParallel (map$<$ string, string $>$ {\em argMap}, int {\em rank}, int {\em size})}\label{Scheduler_8h_1ae725de82489aa2796c9c606107529c}


\index{Scheduler.h@{Scheduler.h}!FinalizeMPI@{FinalizeMPI}}
\index{FinalizeMPI@{FinalizeMPI}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void FinalizeMPI ()}\label{Scheduler_8h_b01492e7612823a34a325619f46862e5}


\index{Scheduler.h@{Scheduler.h}!findandreplace@{findandreplace}}
\index{findandreplace@{findandreplace}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void findandreplace (string \& {\em source}, string {\em find}, string {\em replace})}\label{Scheduler_8h_f35bdd351ea96f77bd306c2dad2e8a16}


\index{Scheduler.h@{Scheduler.h}!getFileLine@{getFileLine}}
\index{getFileLine@{getFileLine}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string getFileLine (ifstream \& {\em input})}\label{Scheduler_8h_6ef576c7fbc8f10f7937e5cd8d747e96}


\index{Scheduler.h@{Scheduler.h}!getPath@{getPath}}
\index{getPath@{getPath}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string getPath (string {\em Filename})}\label{Scheduler_8h_fc7f382e4ff9f72a1afa74bf2d32d865}


\index{Scheduler.h@{Scheduler.h}!getStringsFileline@{getStringsFileline}}
\index{getStringsFileline@{getStringsFileline}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}vector$<$string$>$$\ast$ getStringsFileline (ifstream \& {\em input}, const char $\ast$ {\em delim}, bool {\em treatConsecutiveDelimAsOne})}\label{Scheduler_8h_1d40d62ed9b660097daf92c4e941414f}


\index{Scheduler.h@{Scheduler.h}!InitializeMPI@{InitializeMPI}}
\index{InitializeMPI@{InitializeMPI}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void InitializeMPI (int $\ast$ {\em argc}, char $\ast$$\ast$$\ast$ {\em argv}, int \& {\em Size}, int \& {\em Rank})}\label{Scheduler_8h_0218beda002d263b8b792964cb874a82}


\index{Scheduler.h@{Scheduler.h}!itoa@{itoa}}
\index{itoa@{itoa}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ itoa (int {\em inNum})}\label{Scheduler_8h_028b52918e9d45f95ac237fce8d27116}


\index{Scheduler.h@{Scheduler.h}!load\_\-to\_\-buffer@{load\_\-to\_\-buffer}}
\index{load\_\-to\_\-buffer@{load\_\-to\_\-buffer}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string load\_\-to\_\-buffer (string {\em filename})}\label{Scheduler_8h_b329505738f7fbb53d9392340d9c82a0}


\index{Scheduler.h@{Scheduler.h}!parseJobsFile@{parseJobsFile}}
\index{parseJobsFile@{parseJobsFile}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}vector$<${\bf job}$\ast$$>$ parseJobsFile (string {\em filename})}\label{Scheduler_8h_fa97d0bacea714cb3c4bbe0f54ed608f}


\index{Scheduler.h@{Scheduler.h}!perr@{perr}}
\index{perr@{perr}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void perr (const char $\ast$)}\label{Scheduler_8h_da1725bddffe64dd32e02892fd727816}


\index{Scheduler.h@{Scheduler.h}!PrintFileBuffer@{PrintFileBuffer}}
\index{PrintFileBuffer@{PrintFileBuffer}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void PrintFileBuffer (map$<$ string, map$<$ int, string $>$ $>$ {\em FileMap}, vector$<$ {\bf job} $\ast$ $>$ {\em JobQueue})}\label{Scheduler_8h_1c4e280769ab5a8dd84f8ba2dc780be1}


\index{Scheduler.h@{Scheduler.h}!printFileLineOutput@{printFileLineOutput}}
\index{printFileLineOutput@{printFileLineOutput}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void printFileLineOutput ()}\label{Scheduler_8h_46b32d49f15e50ed9577105d9d35a669}


\index{Scheduler.h@{Scheduler.h}!printParallelJobOutput@{printParallelJobOutput}}
\index{printParallelJobOutput@{printParallelJobOutput}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void printParallelJobOutput (vector$<$ {\bf job} $\ast$ $>$ {\em jobQueue})}\label{Scheduler_8h_0c9b631b501573a58426ff9c996af158}


\index{Scheduler.h@{Scheduler.h}!push\_\-stream@{push\_\-stream}}
\index{push\_\-stream@{push\_\-stream}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void push\_\-stream (int {\em rank}, {\bf NFstream} \& {\em strm})}\label{Scheduler_8h_94b4369c216a53c645f807658ec33cf1}


\index{Scheduler.h@{Scheduler.h}!recv\_\-from\_\-master@{recv\_\-from\_\-master}}
\index{recv\_\-from\_\-master@{recv\_\-from\_\-master}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void recv\_\-from\_\-master ()}\label{Scheduler_8h_76eff27c2d5f5b3424f2605627a02b59}


\index{Scheduler.h@{Scheduler.h}!recv\_\-from\_\-slave@{recv\_\-from\_\-slave}}
\index{recv\_\-from\_\-slave@{recv\_\-from\_\-slave}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void recv\_\-from\_\-slave ()}\label{Scheduler_8h_971862c84bcdcb4e794eaae8dd11b36e}


\index{Scheduler.h@{Scheduler.h}!schedulerInterpreter@{schedulerInterpreter}}
\index{schedulerInterpreter@{schedulerInterpreter}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int schedulerInterpreter (int $\ast$ {\em argc}, char $\ast$$\ast$$\ast$ {\em argv})}\label{Scheduler_8h_b4746bfbb12c3d7e4faedbddaae7cfab}


\index{Scheduler.h@{Scheduler.h}!send\_\-to\_\-master@{send\_\-to\_\-master}}
\index{send\_\-to\_\-master@{send\_\-to\_\-master}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void send\_\-to\_\-master (int {\em myid}, int {\em tag}, int {\em datalen}, char $\ast$ {\em data})}\label{Scheduler_8h_4b626becaf7739de57ffa8462e81991a}


\index{Scheduler.h@{Scheduler.h}!send\_\-to\_\-slave@{send\_\-to\_\-slave}}
\index{send\_\-to\_\-slave@{send\_\-to\_\-slave}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void send\_\-to\_\-slave (int {\em slave}, int {\em tag}, int {\em datalen}, char $\ast$ {\em data})}\label{Scheduler_8h_d66eee2c0be0214ff5cb6269c0b3fb0c}


\index{Scheduler.h@{Scheduler.h}!stringToStrings@{stringToStrings}}
\index{stringToStrings@{stringToStrings}!Scheduler.h@{Scheduler.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}vector$<$string$>$$\ast$ stringToStrings (string {\em fullString}, const char $\ast$ {\em delim}, bool {\em treatConsecutiveDelimAsOne} = {\tt true})}\label{Scheduler_8h_57f3d52b8c7939235a5622f5509fb58b}


